home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / f90 / csmg.z / csmg
Text File  |  1998-10-30  |  4KB  |  86 lines

  1. CSMG(3I)                                               Last changed: 2-5-98
  2.  
  3.  
  4. NNAAMMEE
  5.      CCSSMMGG - Performs a conditional scalar merge
  6.  
  7. SSYYNNOOPPSSIISS
  8.      CCSSMMGG (([II==]_i,, [JJ==]_j,, [KK==]_k))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      The CCSSMMGG intrinsic function merges _i and _j, controlled by the bit mask
  18.      in _k.  When a 1 bit appears in _k, the corresponding bit of _i becomes
  19.      the corresponding bit of the result.  When a 0 bit appears in _k, the
  20.      corresponding bit of _j is taken.  Therefore, CCSSMMGG((_i,, _j,, _k)) equals the
  21.      following specification:
  22.  
  23.           (_i ..AANNDD.. _k)) ..OORR.. ((_j ..AANNDD.. ..NNOOTT.. _k)
  24.  
  25.      The CCSSMMGG function accepts the following arguments:
  26.  
  27.      _i    First item to be merged.  Can be of Boolean, integer, real, or
  28.           Cray pointer type.
  29.  
  30.           If _i is of type integer or real, it must be of KKIINNDD==88 on UNICOS
  31.           and UNICOS/mk systems.  On IRIX systems, _i can be of KKIINNDD==44 or
  32.           KKIINNDD==88, but it must be the same length as _j and _k.
  33.  
  34.      _j    Second item to be merged.  Can be of Boolean, integer, real, or
  35.           Cray pointer type.
  36.  
  37.           If _j is of type integer or real, it must be of KKIINNDD==88 on UNICOS
  38.           and UNICOS/mk systems.  On IRIX systems, _j can be of KKIINNDD==44 or
  39.           KKIINNDD==88, but it must be the same length as _i and _k.
  40.  
  41.      _k    Bit mask.  Can be of Boolean, integer, real, or Cray pointer
  42.           type.
  43.  
  44.           If _k is of type integer or real, it must be of KKIINNDD==88 on UNICOS
  45.           and UNICOS/mk systems.  On IRIX systems, _k can be of KKIINNDD==44 or
  46.           KKIINNDD==88, but it must be the same length as _i and _j.
  47.  
  48.      CCSSMMGG is an elemental function.  The name of this intrinsic cannot be
  49.      passed as an argument.
  50.  
  51. NNOOTTEESS
  52.      The CCSSMMGG intrinsic function is outmoded.  Refer to the _F_o_r_t_r_a_n
  53.      _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _3, publication SR-3905, for
  54.      information on outmoded features and their preferred standard
  55.      alternatives.
  56.  
  57. RREETTUURRNN VVAALLUUEESS
  58.      The return value is of Boolean type.
  59.  
  60. EEXXAAMMPPLLEESS
  61.      Example 1:  Specifying CCSSMMGG((_i,,_j,,MMAASSKK((6644)) or CCSSMMGG((_i,,_j,,--11)) returns ii.
  62.  
  63.      Example 2:  CCSSMMGG((_i,,_j,,00)) returns _j.
  64.  
  65.      Example 3:  Specifying the conditional scalar merge CCSSMMGG(( ''AABBCCDDEEFFGGHH''HH,,
  66.      ''1122334455667788''HH,, XX''00000000FFFFFFFFFFFF00000000FFFF'' )) generates ''1122CCDDEE6677HH''HH as the
  67.      result.
  68.  
  69.      Example 4:  This example applies only to UNICOS systems.
  70.  
  71.                 INTEGER EXPONENT,EXPMASK
  72.                 PARAMETER( EXPMASK = X'7FFF000000000000' )
  73.           C Statement function:
  74.                 EXPONENT(X) = SHIFTR(X .AND. EXPMASK, 48)
  75.           C Statement function:
  76.                 DIVBY2(X) =
  77.               & CSMG( SHIFTL(EXPONENT(X)-1,48),
  78.               &       X,
  79.               &       EXPMASK )
  80.  
  81.      According to this example, a call to DDIIVVBBYY22((--2288..00)) yields -14.0.
  82.  
  83. SSEEEE AALLSSOO
  84.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  85.      printed version of this man page.
  86.